package com.tycmc.signelectroniccontracts.tools.htmlcommit;

import java.util.ArrayList;
import java.util.List;

public class HtCommitEntity {
    private String css_style = "";//表单样式类型的类型（附件 -类型）
    private String css_id = "";//类型id
    private String isneed = "";//是否是必选项（0 非必选 1必选）
    private String showkey = "";//显示提示
    private String upkey = "";//上传的字段 对应可显示的上传字段
    private String showcontent = "";//显示默认值
    private String needContent = "";//必选项的提示
    private String tagKey = "";//存放隐藏的上传内容 的上传字段
    private String tagContent = "";//存放隐藏的上传内容
    private String relation = "";//是否存在关联关系
    private String relation_name = "";//关联的关系名称
    private String relation_value = "";//对应的关联的值
    private String relationsname = "";//是相等还是不相等
    private List<ChoseDataEntity> choselist = new ArrayList<>();//选项卡内容的集合
    private InputMapEntity inputMapEntity;//输入框的存储对象
    private DataMapEntity dataMapEntity;//时间选择器的功能模块
    private PicterMapEntity picterMapEntity;//图片选择

    public PicterMapEntity getPicterMapEntity() {
        if (picterMapEntity == null) {
            picterMapEntity= new PicterMapEntity();
        }
        return picterMapEntity;
    }

    public void setPicterMapEntity(PicterMapEntity picterMapEntity) {
        this.picterMapEntity = picterMapEntity;
    }

    public String getRelation() {
        return relation;
    }

    public void setRelation(String relation) {
        this.relation = relation;
    }

    public String getRelation_name() {
        return relation_name;
    }

    public void setRelation_name(String relation_name) {
        this.relation_name = relation_name;
    }

    public String getRelation_value() {
        return relation_value;
    }

    public void setRelation_value(String relation_value) {
        this.relation_value = relation_value;
    }

    public String getRelationsname() {
        return relationsname;
    }

    public void setRelationsname(String relationsname) {
        this.relationsname = relationsname;
    }

    public InputMapEntity getInputMapEntity() {
        if (inputMapEntity == null) {
            inputMapEntity = new InputMapEntity();
        }
        return inputMapEntity;
    }

    public void setInputMapEntity(InputMapEntity inputMapEntity) {
        this.inputMapEntity = inputMapEntity;
    }

    public DataMapEntity getDataMapEntity() {
        if (dataMapEntity == null) {
            dataMapEntity = new DataMapEntity();
        }
        return dataMapEntity;
    }

    public void setDataMapEntity(DataMapEntity dataMapEntity) {
        this.dataMapEntity = dataMapEntity;
    }

    public String getNeedContent() {
        return needContent;
    }

    public void setNeedContent(String needContent) {
        this.needContent = needContent;
    }

    public String getTagKey() {
        return tagKey;
    }

    public void setTagKey(String tagKey) {
        this.tagKey = tagKey;
    }

    public String getTagContent() {
        return tagContent;
    }

    public void setTagContent(String tagContent) {
        this.tagContent = tagContent;
    }


    public int getCss_style() {
        try {
            return Integer.valueOf(css_style);
        } catch (Exception e) {
            return 1;
        }
    }


    public void setCss_style(String css_style) {
        this.css_style = css_style;
    }

    public String getCss_id() {
        return css_id;
    }

    public void setCss_id(String css_id) {
        this.css_id = css_id;
    }


    public String getIsneed() {
        return isneed;
    }

    public void setIsneed(String isneed) {
        this.isneed = isneed;
    }


    public String getShowkey() {
        return showkey;
    }

    public void setShowkey(String showkey) {
        this.showkey = showkey;
    }

    public String getUpkey() {
        return upkey;
    }

    public void setUpkey(String upkey) {
        this.upkey = upkey;
    }

    public String getShowcontent() {
        return showcontent;
    }

    public void setShowcontent(String showcontent) {
        this.showcontent = showcontent;
    }


    public List<ChoseDataEntity> getChoselist() {
        return choselist;
    }

    public void setChoselist(List<ChoseDataEntity> choselist) {
        this.choselist.clear();
        this.choselist.addAll(choselist);
    }

    public static class PicterMapEntity {
        private int maxsize = 9;//图片的最大数量
        private List<String> picterList = new ArrayList<>();//图片数量的集合

        public int getMaxsize() {
            return maxsize;
        }

        public void setMaxsize(String maxsize) {
            try {
                this.maxsize = Integer.valueOf(maxsize);
            } catch (Exception e) {
                this.maxsize = 1;
            }
        }

        public List<String> getPicterList() {
            return picterList;
        }

        public void setPicterList(List<String> picterList) {
            this.picterList.clear();
            this.picterList.addAll(picterList);
        }

        public void addAll(List<String> picterList) {
            this.picterList.addAll(picterList);
        }

        public void addPicter(String str) {
            this.picterList.add(str);
        }
    }

    /**
     * 输入框的选择方式
     */
    public static class InputMapEntity {
        private String hintcontent;//输入框的默认提示值
        private String inputlength;//输入框所能输入的最大长度
        private String inputstytle;//输入框输入的类型
        private String lines;//输入框的行数

        public int getLines() {
            try {
                return Integer.valueOf(lines);
            } catch (Exception e) {
                return 1;
            }

        }

        public void setLines(String lines) {
            this.lines = lines;
        }

        public String getHintcontent() {
            return hintcontent;
        }

        public void setHintcontent(String hintcontent) {
            this.hintcontent = hintcontent;
        }

        public int getInputlength() {
            try {
                return Integer.valueOf(inputlength);
            } catch (Exception e) {
                return 0;
            }
        }

        public void setInputlength(String inputlength) {
            this.inputlength = inputlength;
        }

        public String getInputstytle() {
            return inputstytle;
        }

        public void setInputstytle(String inputstytle) {
            this.inputstytle = inputstytle;
        }


    }

    /**
     * 时间的选择项
     */
    public static class DataMapEntity {
        private String startTime;//时间选择的开始时间
        private String endTime;//时间选择的结束时间
        private String ishour;//时间的选择格式年月日，是否有时分 1有时分 0没有

        public String getStartTime() {
            return startTime;
        }

        public void setStartTime(String startTime) {
            this.startTime = startTime;
        }

        public String getEndTime() {
            return endTime;
        }

        public void setEndTime(String endTime) {
            this.endTime = endTime;
        }

        public String getIshour() {
            return ishour;
        }

        public void setIshour(String ishour) {
            this.ishour = ishour;
        }
    }

    /**
     * 工具的选择类
     */
    public static class ChoseDataEntity {
        private String chosename;//选项卡的显示的字段
        private String choseid;//选项卡的id
        private List<HtCommitEntity> htList = new ArrayList<>();

        public ChoseDataEntity() {
        }

        public List<HtCommitEntity> getHtList() {
            return htList;
        }

        public void setHtList(List<HtCommitEntity> htList) {
            this.htList.clear();
            this.htList.addAll(htList);
        }

        public String getChosename() {
            return chosename;
        }

        public void setChosename(String chosename) {
            this.chosename = chosename;
        }

        public String getChoseid() {
            return choseid;
        }

        public void setChoseid(String choseid) {
            this.choseid = choseid;
        }
    }


}
